using UnityEngine;

[ExecuteInEditMode]
public class PresetsCheckPoint : MonoBehaviour
{
	[HideInInspector]
	public ControllerCheckPointSpawn controllerSpawn;

	private ControllerCheckPoint controller;

	private void LateUpdate()
	{
		if (Application.isEditor && !Application.isPlaying)
		{
			Refresh();
		}
	}

	private void Refresh()
	{
		if (controller == null)
		{
			controller = base.gameObject.GetComponent<RemoteControl>().controller.GetComponent<ControllerCheckPoint>();
		}
		if (controller.spawnPoint == null)
		{
			controller.spawnPoint = controllerSpawn.gameObject;
		}
	}

	public void SetupControllerSpawn(Object prefab)
	{
	}
}
